docs: RFC for JSONL streaming format#14
Merged
eliot-emp merged 8 commits intoempathic:mainfrom Apr 17, 2026
Merged
Conversation
Defines a line-oriented JSONL companion to the canonical Toolpath JSON format, optimized for incremental persistence of Path documents. The format supports live agent traces and multi-writer append logs while round-tripping losslessly with canonical JSON. Requires one additive schema change: an optional graph_ref field on PathIdentity so a streamed path can name the graph it belongs to.
- Define .path.json (canonical) and .path.jsonl (streaming) extensions - Replace .toolpath.jsonl with .path.jsonl in the JSONL RFC - Add constraint: graph $ref entries must point to sealed .path.json - Add File Extensions section to the base RFC
Multi-writer append logs are not a realistic use case. Simplify the motivation, durability, and design rationale sections to focus solely on the live agent trace use case.
Sealing collapses intermediate PathMeta overwrites and does not preserve line ordering, so JSONL -> JSON -> JSONL is lossy. The actual guarantees are: - JSON -> JSONL -> JSON is lossless: seal(stream(P)) == P - The sealed form is stable: seal(stream(seal(L))) == seal(L) Updated the abstract, goals, round-trip section, signatures section, and strict parsing rationale to reflect this.
The "sealing" and "streaming" abstractions added ceremony without value — they're just "how to read a JSONL file" and "how to write a JSONL file." Renamed throughout: - Sealing Algorithm -> Reading JSONL - Streaming Algorithm -> Writing JSONL - seal()/stream() -> read()/write() in round-trip identities - Updated all references in abstract, goals, signatures, compatibility, open questions, and design rationale
- Collapse if-blocks into match guards (collapsible_match) - Use sort_by_key with Reverse instead of sort_by (unnecessary_sort_by)
Forward compatibility matters more than strict rejection. Older readers should produce a correct (if incomplete) view of a path written by a newer producer, rather than refusing to read it. Unknown lines are skipped with a warning. Version bumps remain available for truly incompatible structural changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/RFC-jsonl.md: a draft RFC defining a line-oriented JSONL companion to Toolpath's canonical JSON format.stream ↔ sealcycles.graph_refonPathIdentity.Docs-only. Implementation will follow in a separate PR once the RFC is accepted.
Test plan
docs/RFC-correlation.mdPathIdentity.graph_refaddition is acceptable